package jpa;

import java.io.Serializable;
import javax.persistence.*;


/**
 * The persistent class for the LINK database table.
 * 
 */
@Entity
public class Link implements Serializable {
	private static final long serialVersionUID = 1L;

	@EmbeddedId
	private LinkPK id;

	@Column(name="LINK_LABEL")
	private String linkLabel;

	@Column(name="LINK_TYPE")
	private String linkType;

	//bi-directional many-to-one association to Page
    @ManyToOne
	@JoinColumn(name="LINK_CHILD", insertable=false, updatable=false)
	private Page page1;

	//bi-directional many-to-one association to Page
    @ManyToOne
	@JoinColumn(name="LINK_PARENT" , insertable=false, updatable=false)
	private Page page2;

    public Link() {
    }

	public LinkPK getId() {
		return this.id;
	}

	public void setId(LinkPK id) {
		this.id = id;
	}
	
	public String getLinkLabel() {
		return this.linkLabel;
	}

	public void setLinkLabel(String linkLabel) {
		this.linkLabel = linkLabel;
	}

	public String getLinkType() {
		return this.linkType;
	}

	public void setLinkType(String linkType) {
		this.linkType = linkType;
	}

	public Page getPage1() {
		return this.page1;
	}

	public void setPage1(Page page1) {
		this.page1 = page1;
	}
	
	public Page getPage2() {
		return this.page2;
	}

	public void setPage2(Page page2) {
		this.page2 = page2;
	}
	
}